import * as apiService from '@/services/api';

/**
 * 取得IP重叠列表
 * @param params
 * @returns {Promise<*>}
 */
const riskIpOverlayListApi = params => apiService.post(api.OPERATIONAL_RISK_IP,
  params);

/**
 * 取得同设备号查询列表
 * @param params
 * @returns {Promise<*>}
 */
const riskDeviceConflictListApi = params => apiService.post(api.OPERATIONAL_RISK_DEVICE,
  params);

/**
 * 取得返奖率列表
 * @param params
 * @returns {Promise<*>}
 */
const riskAwardRateListApi = params => apiService.post(api.OPERATIONAL_RISK_AWARDS,
  params);

/**
 * 取得用户登录日志
 * @param params
 * @returns {Promise<*>}
 */
const riskUserLoginListApi = params => apiService.post(api.OPERATIONAL_RISK_LOGIN,
  params);
/**
 * 查询会员转账限制列表
 * @param params
 * @returns {Promise<*>}
 */
const riskTransferListApi = params => apiService.post(api.OPERATIONAL_RISK_TRANSFER_LIST,
  params);
/**
 * 保存会员转账金额限制
 * @param params
 * @returns {Promise<*>}
 */
const riskTransferAmountApi = params => apiService.post(api.OPERATIONAL_RISK_TRANSFER_AMOUNT,
  params);
/**
 * 保存会员转账开关设置
 * @param params
 * @returns {Promise<*>}
 */

const riskTransferOpenApi = params => apiService.post(api.OPERATIONAL_RISK_TRANSFER_OPEN,
  params);
/**
 * 查询-黑名单行为监控
 * @param params
 * @returns {Promise<*>}
 */
const risBlackListBehaviorApi = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR,
  params);
/**
 * 查询-黑名单行为监控-获取最高等级
 * @param params
 * @returns {Promise<*>}
 */
const risBlackListBehaviorLevelApi = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_LEVEL,
  params);
/**
 * 查询-黑名单行为监控-调整关联等级
 * @param params
 * @returns {Promise<*>}
 */
const risBlackListGetLevelApi = params => apiService.get(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_GET_LEVEL,
  params);
/**
 * 黑名单行为监控-列表项-设为已读
 * @param params
 * @returns {Promise<*>}
 */
const risBlackListSetReadedApi = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_SET_READED,
  params);
/**
 * 黑名单行为监控-黑名单关联调整
 * @param params
 * @returns {Promise<*>}
 */
const risBlackListAdjustApi = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_ADJUST, params);
/**
 * 黑名单行为监控-全部设为已读
 * @param params
 * @returns {Promise<*>}
 */
const risBlackListSetAllReadedApi = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_SET_AllREADED,
  params);

/**
 * 查询-获取所有黑名单信息
 * @param params
 * @returns {Promise<*>}
 */
const getBlackList = params => apiService.get(api.BLACKLIST_MANAGE_LIST, params);
/**
 * 调整黑名单等级信息
 * @param params
 * @returns {Promise<*>}
 */
const updateBlackListLeval = params => apiService.post(api.BLACKLIST_UPDATE_LEVAL, params);
/**
 * 添加黑名单
 * @param params
 * @returns {Promise<*>}
 */
const blackListAdd = params => apiService.post(api.BLACKLIST_ADD, params);
/**
 * 获取所有黑名单等级
 * @param params
 * @returns {Promise<*>}
 */
const getBlackListLeval = param => apiService.get(api.BLACKLIST_LEVAL_LIST, param);
/**
 * 新增等级
 * @param params
 * @returns {Promise<*>}
 */
const blackListLevalAdd = params => apiService.post(api.BLACKLIST_LEVAL_ADD, params);
/**
 * 删除黑名单等级
 * @param params
 * @returns {Promise<*>}
 */
const blackListLevalDelete = params => apiService.post(api.BLACKLIST_LEVAL_DELETE, params);
/**
 * 修改黑名单等级名称
 * @param params
 * @returns {Promise<*>}
 */
const blackListLevalUpdate = params => apiService.post(api.BLACKLIST_LEVAL_UPDATE, params);
/**
 * 修改等级权限
 * @param params
 * @returns {Promise<*>}
 */
const blackListLevalUpdatePermission = params => apiService.post(api.BLACKLIST_LEVAL_UPDATE_PERMISSION, params);
/**
 * 获取黑名单日志列表
 * @param params
 * @returns {Promise<*>}
 */
const blackListLog = params => apiService.post(api.BLACKLIST_LOG_LIST, params);
/**
 * 获取黑名单统计报表
 * @param params
 * @returns {Promise<*>}
 */
const blackListReport = params => apiService.post(api.BLACKLIST_REPORT_LIST, params);
/**
 * 导出黑名单统计报表
 * @param params
 * @returns {Promise<*>}
 */
const blackListExportReport = params => apiService.post(api.BLACKLIST_REPORT_EXPORT, params);
/**
 * 获取当前ip段会覆盖的IP记录
 * @param params
 * @returns {Promise<*>}
 */
const blackListSameIp = params => apiService.get(api.BLACKLIST_SAMEIP_LIST, params);
/**
 * 黑名单监控开关
 * @param params
 * @returns {Promise<*>}
 */
const blackSwitch = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_SWITCH, params);
/**
 * 获取黑名单监控开关状态
 * @param params
 * @returns {Promise<*>}
 */
const getSwitchType = params => apiService.post(api.OPERATIONAL_RISK_BLACKLIST_BEHAVIOR_GET_TYPE, params);

export {
  riskIpOverlayListApi,
  riskDeviceConflictListApi,
  riskAwardRateListApi,
  riskUserLoginListApi,
  riskTransferListApi,
  riskTransferAmountApi,
  riskTransferOpenApi,
  risBlackListBehaviorApi,
  risBlackListBehaviorLevelApi,
  risBlackListGetLevelApi,
  risBlackListSetReadedApi,
  risBlackListAdjustApi,
  risBlackListSetAllReadedApi,
  // 风控黑名单
  getBlackList,
  updateBlackListLeval,
  blackListAdd,
  getBlackListLeval,
  blackListLevalAdd,
  blackListLevalDelete,
  blackListLevalUpdate,
  blackListLevalUpdatePermission,
  blackListLog,
  blackListReport,
  blackListExportReport,
  blackListSameIp,
  blackSwitch,
  getSwitchType,
};
